﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TruthTree2.PC.Logic
{
    public abstract class Sentence : IComparable<Sentence>
    {
        public int CompareTo(Sentence o)
        {
            return SortValue.CompareTo(o.SortValue);
        }

        /// <summary>
        /// How many branches will this produce if decomposed
        /// </summary>
        public abstract int SortValue { get; }
        public abstract bool Decomposable { get; }

        public abstract Sentence Copy();
        public Sentence GetNegation() { return new Negation(Copy()); }
        public abstract Decomposition GetDecomposition();

        public abstract bool Equal(Sentence o);

        public override abstract string ToString();
        public override int GetHashCode() { return ToString().GetHashCode(); }
    }
}
